import React, {Component} from 'react';
import {Tab} from 'saltui';
import {Card} from "../pages/context/work/roommanage/RoomManage";


export default class HTab extends React.Component {
  constructor(props) {
    super(props);
    this.state = {};
    this.state.active = this.props.active
    this.state.roomType = this.props.roomType
    this.state.onTabClick  = this.props.onTabClick;
  }
    render() {
      return <Tab activeKey={this.props.active}
                  showScroll
                   onTabClick={this.state.onTabClick}

      >
        {
          this.state.roomType.map((type, index) => (
            <Tab.Item key={index} title={type.name}  ></Tab.Item>
          ))
        }
      </Tab>
    }
  }

